package lrscp.lib;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

public class Help {
    public static BufferedReader createBufferedReader(InputStream is, String charset) throws UnsupportedEncodingException {
        return new BufferedReader(new InputStreamReader(is, charset));
    }

    public static BufferedReader createBufferedReader(InputStream is) {
        return new BufferedReader(new InputStreamReader(is));
    }

    public static BufferedWriter createBufferedWriter(OutputStream os, String charset)
            throws UnsupportedEncodingException {
        return new BufferedWriter(new OutputStreamWriter(os, charset));
    }

    public static BufferedWriter createBufferedWriter(OutputStream os) {
        return new BufferedWriter(new OutputStreamWriter(os));
    }
}
